//
//  Primer_OC_Block_DemoVC.m
//  APSwift
//
//  Created by jianbo.pei on 2023/10/26.
//

#import "Primer_OC_Block_DemoVC.h"

@interface Primer_OC_Block_DemoVC ()

@end

@implementation Primer_OC_Block_DemoVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = UIColor.whiteColor;
    [self test];
}

- (void)test {
    NSInteger a = 100;
    void(^block)(void) = ^{
        NSLog(@"block = %ld:", a);
    };
     
    a += 1;
    NSLog(@"out1 = %ld:", a);
    block();
    NSLog(@"out2 = %ld:", a);
    
    /**
     out1 = 101:
     block = 100:
     out2 = 101:
     */
}


@end
